{
    "root": true,
    "extends": [
        "eslint:recommended"
    ],
    "env": {
        "browser": true,
        "es6": true,
        "greasemonkey": true,
        "node": true
    },
    "plugins": [
        "@typescript-eslint"
    ],
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
        "sourceType": "module",
        "ecmaVersion": 2021
    },
    "overrides": [
        {
            "files": ["**/*.ts"],
            "extends": ["plugin:@typescript-eslint/recommended"],
            "rules": {
                "no-undef": "off",
                "no-redeclare": "off",
                "@typescript-eslint/no-redeclare": [
                    "error"
                ],
                "no-unused-vars": "off",
                "@typescript-eslint/no-unused-vars": [
                    "error"
                ],
                "@typescript-eslint/member-delimiter-style": [
                    "warn",
                    {
                        "multiline": {
                            "delimiter": "comma",
                            "requireLast": true
                        },
                        "singleline": {
                            "delimiter": "comma",
                            "requireLast": false
                        },
                        "overrides": {
                            "interface": {
                                "multiline": {
                                    "delimiter": "semi",
                                    "requireLast": true
                                },
                                "singleline": {
                                    "delimiter": "semi",
                                    "requireLast": true
                                }
                            }
                        }
                    }
                ]
            }
        }
    ],
    "rules": {
        "arrow-spacing": [
            1,
            {
                "after": true,
                "before": true
            }
        ],
        "block-scoped-var": 2,
        "eol-last": 2,
        "indent": [
            "error",
            2,
            {
                "SwitchCase": 1,
                "VariableDeclarator": "first",
                "ignoreComments": true,
                "MemberExpression": "off",
                "outerIIFEBody": 0,
                "flatTernaryExpressions": true
            }
        ],
        "keyword-spacing": [
            "error",
            {
                "before": true,
                "after": true
            }
        ],
        "key-spacing": [
            2,
            {
                "afterColon": true,
                "mode": "minimum"
            }
        ],
        "lines-around-comment": [
            1,
            {
                "beforeBlockComment": true,
                "beforeLineComment": false
            }
        ],
        "no-debugger": 1,
        "no-console": 0,
        "no-extra-semi": 2,
        "no-irregular-whitespace": 2,
        "no-label-var": 1,
        "no-mixed-spaces-and-tabs": 2,
        "no-multi-spaces": [
            1,
            {
                "ignoreEOLComments": true
            }
        ],
        "no-redeclare": [
            2,
            {
                "builtinGlobals": true
            }
        ],
        "no-self-compare": 2,
        "no-sparse-arrays": 1,
        "no-trailing-spaces": 2,
        "no-undef": 1,
        "no-unreachable": 2,
        "no-unused-vars": 1,
        "object-curly-spacing": [1, "never"],
        "prefer-const": 1,
        "prefer-spread": 1,
        "quotes": [
            2,
            "single",
            {
                "avoidEscape": true
            }
        ],
        "semi": [
            1,
            "always"
        ],
        "semi-spacing": [
            1,
            {
                "after": true
            }
        ],
        "space-infix-ops": 1,
        "space-before-function-paren": [
            2,
            {
                "anonymous": "always",
                "named": "never",
                "asyncArrow": "always"
            }
        ],
        "spaced-comment": [
            1,
            "always",
            {}
        ],
        "valid-typeof": 1,
        "wrap-iife": [
            1,
            "inside"
        ],
        "wrap-regex": 1
    }
}
